import Config from "config/config"
import { getData, postData } from "renderer/libs/axios/axios"


export function getUserDetail(token: string) {
  return getData(Config.userDetailApi, {}, {
    headers: {
      Authorization: `Bearer ${token}`
    }
  })
}

interface StudyRecordReq {
  username: string
  user_id: number
  tenant_code: number
  type: string
  course_id: number | undefined
  course_subject_id: number | undefined
  learn_time: number
  play_time: number
  token: string
  force: number | undefined
}

export function studyRecord(params: StudyRecordReq) {
  return postData(Config.recordApi, params)
}

